<div class="container-fluid" style="margin: 10px 0;">
	<div class="row">
		<div class="col-xs-12">
            <form id="demoForm">
			<table  class="dialog">
				<tr>
					<th>DemoID:</th>
					<td><input name="demoId" type="text" id="demoId" class="form-control"></td>
				</tr>
				<tr>
					<th>DemoString:</th>
					<td><input name="demoString" type="text" class="form-control" data-errormessage="至少1个字符,最多20个字符！" data-validation-engine="validate[required,maxSize[20]]"></td>
					<td><span class="must-msg">*</span></td>
				</tr>
                <tr>
                    <th>DemoFloat:</th>
                    <td><input name="lastName" type="text" class="form-control" data-validation-engine="validate[required,maxSize[20]]"></td>
                    <td><span class="must-msg">*</span></td>
                </tr>
				<tr>
					<th>电话 :</th>
					<td><input name="phone" type="text" class="form-control" data-errormessage="请不要输入特殊字符，且最多20个字符！" data-validation-engine="validate[maxSize[20]]" ></td>
                    <td><span class="must-msg"></span></td>
				</tr>
                <tr>
                    <th>翻墙到期时间:</th>
                    <td><input name="jumpWall" type="text" class="form-control" data-validation-engine="validate[custom[date[yyyy-mm-dd]]]" ></td>
                    <td><span class="must-msg"></span></td>
                </tr>
				<tr>
					<th>设备数:</th>
					<td><input name="DeviceNum" type="text" class="form-control" errormsg="请输入1-999的数字！"  data-validation-engine="validate[required,max[999]]" ></td>
                    <td><span class="must-msg">*</span></td>
				</tr>
                <tr>
                    <th>网络成员数:</th>
                    <td><input name="memberNum" type="text" class="form-control" errormsg="请输入1-99999的数字！" data-validation-engine="validate[required,max[99999]]" ></td>
                    <td><span class="must-msg">*</span></td>
                </tr>
                <tr>
                    <th>允许创建的网络数:</th>
                    <td><input name="networkNum" type="text" class="form-control" errormsg="请输入1-999的数字！" data-validation-engine="validate[required,max[999]]" ></td>
                    <td><span class="must-msg">*</span></td>
                </tr>
                <tr>
                    <th>网络在线设备数:</th>
                    <td><input name="networkDevNum" type="text" class="form-control" errormsg="请输入1-99999的数字！"  data-validation-engine="validate[required,max[99999]]"  ></td>
                    <td><span class="must-msg">*</span></td>
                </tr>
                <tr>
                    <th>用户状态:</th>
                    <td><select name="status" type="text" class="form-control">
							<option value="0">正常</option>
							<option value="1">未激活</option>
							<option value="2">停用</option>
					</select></td>
                </tr>
				<tr>
					<th>备注:</th>
					<td><textarea type="text" name="desc" rows="3" class="form-control" data-validation-engine="validate[maxSize[100]]" ></textarea></td>
                    <td><span class="must-msg"></span></td>
				</tr>
			</table>
			<div class="col-xs-6 col-xs-offset-3">
				<button type="submit" id="savebtn" class="btn btn-primary">确认</button>
				<button type="button" id="closeBut" class="btn btn-warning" onclick="closeWindowDialog()">取消</button>
			</div>
            </form>
		</div>
	</div>
</div>
<script type="text/javascript">
    $("#closeBut").focus();
	//初始化表单验证
    $("#userForm").validationEngine({
        promptPosition: "centerRight",//提示信息的位置，默认就是	topRight ("topRight", "topLeft", "bottomRight" "bottomLeft", "centerRight", "centerLeft", "inline")
        binded : true,  //是否绑定实时验
        onValidationComplete : userFormSuccess,
        addPromptClass:"formError-small"
	});
	if (_opreate == "modifiy") {
        $("#userId").attr("disabled", true);
		var service = "user/getUserById";
		var _para = {
			"userId" : _userId
		};
		callSvr(service, _para, function(result) {
			$("#userForm").jsonToform(result);
		});
	} else if (_opreate == "create") {
		$("#userForm input").val("");
		$("#userForm textarea").val("");
	} else {
		var _para = {"userId" : _userId};
		callSvr("user/getUserById",_para,function(result) {
			$("#userForm").jsonToform(result);
		});
		$("[name],#savebtn").attr("disabled", true);
	}
	function closeWindowDialog() {
		$("#windowClosed" + _wid).click();
	}
</script>

